﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace Sorting.Model
{
    /// <summary>
    /// 供应商实体
    /// </summary>
    public class Distributor
    {
        private int? _id;            //物流商ID
        private string _name;        //物流商名称
        private decimal? _price;     //物流商报价
        private int? _flag;          //标识
        private string _flagAsString;//标识图标

        public int? Id
        {
            get
            {
                return _id;
            }

            set
            {
                _id = value;
            }
        }

        public string Name
        {
            get
            {
                return _name;
            }

            set
            {
                _name = value;
            }
        }

        public decimal? Price
        {
            get
            {
                return _price;
            }

            set
            {
                _price = value;
            }
        }

        public int? Flag
        {
            get
            {
                return _flag;
            }

            set
            {
                _flag = value;
            }
        }

        public string FlagAsString
        {
            get
            {
                if (_flag == 1)
                {
                    return "√";
                }
                else
                {
                    return "";
                }
            }

            set
            {
                _flagAsString = value;
            }
        }
    }
}
